﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Text;
using System.Reflection;
using SDT.DataService;

namespace SDT.DataService.Contexts
{
    /// <summary>
    /// Kết nối database : System Spider
    /// </summary>
    public class Spider_SiteContext : SystemSpiderDataContext
    {
        [Function(Name = "dbo.InsertChannel")]
        public int InsertChannel([Parameter(Name = "Name", DbType = "NVarChar(500)")] string name)
        {
            IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), name);
            return (int)(result.ReturnValue);
        }
        [Function(Name = "dbo.UpdateChannel")]
        public int UpdateChannel([Parameter(Name = "SiteID", DbType = "Int")] System.Nullable<int> siteID, [Parameter(Name = "Name", DbType = "NVarChar(500)")] string name)
        {
            IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), siteID, name);
            return ((int)(result.ReturnValue));
        }

    }
}
